import React, { useState } from "react";

export const TodoContext = React.createContext();

export const TodoWrapper = (props) => {
    const [list, setList] = useState([]);
    const { Provider } = TodoContext;
    return (
        <Provider value={{ list, setList }}>
            {props.children}
        </Provider>
    )
}
